add jing for fedora builds. (#942)
authortsteven4 <13596209+tsteven4@users.noreply.github.com>
Thu, 24 Nov 2022 18:18:55 +0000 (11:18 -0700)
committerGitHub <noreply@github.com>
Thu, 24 Nov 2022 18:18:55 +0000 (11:18 -0700)
* add jing for fedora builds.

fedora f35 and on don't have a maintainer and thus the package
isn't available.  kludge in jing on f35.

* improve document validation.

* don't force jeng on f35

tools/Dockerfile_f32
tools/Dockerfile_f35
tools/make_gpsbabel_doc.sh [new file with mode: 0755]
tools/make_gpsbabel_html.sh
tools/make_gpsbabel_org.sh
tools/make_gpsbabel_pdf.sh

index 24e355661fc5728f7fc7be6a5836c8af861da3ed..87d96c4d82c1313050dfaa1dcbd46069a6379b3a 100644 (file)
@@ -16,7 +16,7 @@ RUN dnf install --assumeyes libusbx-devel zlib-devel shapelib-devel && \
 RUN dnf install --assumeyes qt5-qtbase-devel qt5-qtserialport-devel qt5-qtwebengine-devel qt5-linguist qt5-qttranslations && \
     dnf clean all
 # tools to build the docs
-RUN dnf install --assumeyes expat desktop-file-utils libxslt docbook-style-xsl fop && \
+RUN dnf install --assumeyes expat desktop-file-utils libxslt docbook-style-xsl fop docbook5-style-xsl jing && \
     dnf clean all
 # create a link as fedora uses the name qmake-qt5 for Qt5's qmake.
 RUN alternatives --install /usr/bin/qmake qt /usr/lib64/qt5/bin/qmake 100
index b890166831cddf3dc39459b5ad030346bd770832..1b0b05f58984b3ae3065ba1ff17722a594b47940 100644 (file)
@@ -16,7 +16,7 @@ RUN dnf install --assumeyes libusb1-devel zlib-devel shapelib-devel && \
 RUN dnf install --assumeyes qt5-qtbase-devel qt5-qtserialport-devel qt5-qtwebengine-devel qt5-linguist qt5-qttranslations && \
     dnf clean all
 # tools to build the docs
-RUN dnf install --assumeyes expat desktop-file-utils libxslt docbook-style-xsl fop && \
+RUN dnf install --assumeyes expat desktop-file-utils libxslt docbook-style-xsl fop docbook5-style-xsl && \
     dnf clean all
 # create a link as fedora uses the name qmake-qt5 for Qt5's qmake.
 RUN alternatives --install /usr/bin/qmake qt /usr/lib64/qt5/bin/qmake 100
diff --git a/tools/make_gpsbabel_doc.sh b/tools/make_gpsbabel_doc.sh
new file mode 100755 (executable)
index 0000000..d639b7e
--- /dev/null
@@ -0,0 +1,13 @@
+#!/bin/sh
+set -ex
+
+perl xmldoc/makedoc
+xmllint --noout --relaxng http://www.oasis-open.org/docbook/xml/5.0/rng/docbook.rng xmldoc/readme.xml
+# the following doesn't seem to work.
+#xmllint --noout --schematron http://www.oasis-open.org/docbook/xml/5.0/sch/docbook.sch xmldoc/readme.xml
+# jing and many depedencies removed from fedora
+if command -v jing >/dev/null 2>&1; then
+  jing http://docs.oasis-open.org/docbook/xml/5.0/rng/docbook.rng xmldoc/readme.xml
+  # can seed a failure by removing version="5.0" from xmldoc/readme.xml
+  jing http://docs.oasis-open.org/docbook/xml/5.0/sch/docbook.sch xmldoc/readme.xml
+fi
index e0e9c802d7f137b5697d79aec3996ef086f48a6f..e8bd0f63e072f5d94c8b4d31ae7ad1ae772064e1 100755 (executable)
@@ -1,8 +1,9 @@
 #!/bin/sh
 set -ex
 
-perl xmldoc/makedoc
-jing http://docs.oasis-open.org/docbook/rng/5.0/docbook.rng xmldoc/readme.xml
+tooldir=$(cd "$(dirname "$0")" && pwd)
+
+"$tooldir"/make_gpsbabel_doc.sh
 xsltproc \
   --output gpsbabel.html \
   --stringparam toc.section.depth "1" \
index 2474d7df19980fcc788dc14ab05a013659d60eb4..0eb9d0f96eee7c779b3b26bbcb7ab6660102164f 100755 (executable)
@@ -1,17 +1,17 @@
 #!/bin/sh
 set -ex
 
-web=$1
-docversion=$2
+web=${1:-gpsbabel.org}
+docversion=${2:-x.y.z}
+tooldir=$(cd "$(dirname "$0")" && pwd)
 
 mkdir -p "${web}/htmldoc-${docversion}"
-perl xmldoc/makedoc
-jing http://docs.oasis-open.org/docbook/rng/5.0/docbook.rng xmldoc/readme.xml
+"$tooldir"/make_gpsbabel_doc.sh
 xsltproc \
   --stringparam base.dir "${web}/htmldoc-${docversion}/" \
   --stringparam root.filename "index" \
   xmldoc/babelmain.xsl \
   xmldoc/readme.xml
-tools/fixdoc "${web}/htmldoc-${docversion}" "GPSBabel ${docversion}:"
-tools/mkcapabilities "${web}" "${web}/htmldoc-${docversion}"
+"${tooldir}"/fixdoc "${web}/htmldoc-${docversion}" "GPSBabel ${docversion}:"
+"${tooldir}"/mkcapabilities "${web}" "${web}/htmldoc-${docversion}"
 cp gpsbabel.pdf "${web}/htmldoc-${docversion}/gpsbabel-${docversion}.pdf"
index bdd57abc2e29c978afe502f62996a5a497200b57..abe7a560ba0caf0a7f06978bae5fb9c657514e60 100755 (executable)
@@ -1,7 +1,8 @@
 #!/bin/sh
 set -ex
 
-perl xmldoc/makedoc
-jing http://docs.oasis-open.org/docbook/rng/5.0/docbook.rng xmldoc/readme.xml
+tooldir=$(cd "$(dirname "$0")" && pwd)
+
+"$tooldir"/make_gpsbabel_doc.sh
 xsltproc -o gpsbabel.fo xmldoc/babelpdf.xsl xmldoc/readme.xml
 HOME=. fop -q -fo gpsbabel.fo -pdf gpsbabel.pdf